Skip to content

Pass -DPYTHON_EXECUTABLE to cmake#25

Merged
buresu merged 1 commit into
buresu:masterfrom
minoki:set-python-executable
May 15, 2026
Merged

Pass -DPYTHON_EXECUTABLE to cmake#25
buresu merged 1 commit into
buresu:masterfrom
minoki:set-python-executable

Conversation

@minoki
Copy link
Copy Markdown
Contributor

@minoki minoki commented Mar 2, 2023

When building ndi-python with virtualenv without activating it, cmake tries to find system-installed python:

$ # No myenv/bin/activate!
$ myenv/bin/python setup.py build
...
-- Found PythonInterp: <some system-installed python>
-- Found PythonLibs: <some system-installed python>
...

This is not good because the version of found one might be different than virtualenv's one.

Therefore, cmake's PYTHON_EXECUTABLE variable should be explicitly set by setup.py.

This is important when using a virtualenv without activating it.
minamikik added a commit to minamikik/ndi-python that referenced this pull request Feb 23, 2024
@buresu
Copy link
Copy Markdown
Owner

buresu commented May 15, 2026

Thank you for your PR! Sorry for the long wait.
Indeed the library should be built against the python interpreter that is actually running the build.

@buresu buresu merged commit 294e2f4 into buresu:master May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants